home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
smaltalk
/
st80_pr4.lha
/
st80_pre4
/
Foible
/
foible
/
Foible4.1-PPfix.st
< prev
next >
Wrap
Text File
|
1993-07-24
|
3KB
|
98 lines
'From Objectworks for Smalltalk-80(tm), Version 2.5 of 29 July 1989 on 16 April 1990 at 11:26:31 am'!
!CanvasView methodsFor: 'private'!
computeDisplayTransformation
"Answer a new windowingTransformation that transforms the
coordinate system of the canvas into that of the display screen.
Don't scale a canvasView; window and viewport are same size in Foible."
| newTranslation |
newTranslation _ transformation translation + superView displayTransformation translation.
^WindowingTransformation scale: nil translation: newTranslation! !
!StandardSystemView methodsFor: 'framing'!
resizeSubviews
"check and change the sizes of nonstandard subviews"
^self! !
!FoibleView methodsFor: 'framing'!
resizeSubviews
"Just ask the toolBenchView to resize its subviews."
self firstSubView resizeSubviews! !
!FoibleView methodsFor: 'label access'!
newLabel: aString
"Change the name of the models when the label is changed"
model notNil ifTrue: [self model name: aString].
super newLabel: aString! !
!ToolBenchView methodsFor: 'framing'!
resizeSubviews
"Determine the rectangular area for the receiver, adjusted
to the minimum and maximum sizes."
| viewBounds canvasWindow canvasViewPort canvasExtent numOfViews upperLeft |
viewBounds _ self superView viewport. "get bounds from the FoibleView."
self unlock.
canvasExtent _ viewBounds extent.
numOfViews _ self canvas size.
canvasExtent _ canvasExtent x // numOfViews @ canvasExtent y.
canvasWindow _ Rectangle origin: 0 @ 0 extent: canvasExtent.
upperLeft _ 0 @ 0.
self canvas do:
[:each |
canvasViewPort _ Rectangle origin: upperLeft extent: canvasExtent.
upperLeft _ canvasViewPort topRight.
each window: canvasWindow viewport: canvasViewPort]! !
!StandardSystemController methodsFor: 'private'!
trackFrame
"Track the mouse and set the displayBox of the view"
| frame background|
frame _ view displayBox.
view minimumSize = view maximumSize ifTrue: [^self].
background _ Form fromDisplay: view labelDisplayBox.
view displayLabel.
sensor cursorPoint: ((frame corner
max: sensor cursorPoint)
min: frame origin + view maximumSize).
Cursor corner
showWhile:
[Display
outline: [frame corner: ((sensor cursorPoint
max: (frame origin + view minimumSize))
min: (frame origin + view maximumSize))]
while: [Sensor anyButtonPressed]
width: 2
halftone: Form gray].
background displayAt: view labelDisplayBox origin.
view window: view window viewport: frame.
view resizeSubviews! !
!PaletteController methodsFor: 'basic control sequence'!
controlInitialize
| displayBox |
displayBox _ view insetDisplayBox expandBy: 0@2.
scrollBar _ scrollBar align: scrollBar topRight with: displayBox topLeft.
self class getSavedAreaFor: scrollBar.
scrollBar display.
self displayTools! !